package com.baizhi.shane.shane.mapper;

import com.baizhi.shane.shane.dto.EssayLabelOutDTO;
import com.baizhi.shane.shane.dto.GetOneEssayOutDTO;
import com.baizhi.shane.shane.dto.PageEssayOutDTO;
import com.baizhi.shane.shane.dto.PageInDTO;
import com.baizhi.shane.shane.entity.ShaneEssay;
import com.baizhi.shane.shane.vo.CountVO;
import com.baizhi.shane.shane.vo.PageInVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author wbz12
* @description 针对表【shane_essay(啥呢文章表)】的数据库操作Mapper
* @createDate 2023-07-25 22:33:37
* @Entity com.baizhi.shane.shane.entity.ShaneEssay
*/
public interface ShaneEssayMapper extends BaseMapper<ShaneEssay> {

    List<PageEssayOutDTO> pageByContent(PageInDTO pageInDTO);

    List<CountVO> getEssayLikeCountByEssayIdList(@Param("essayIdList") List<Long> essayIdList, @Param("userId") Long userId);

    List<CountVO> getEssayAgainstCountByEssayIdList(@Param("essayIdList") List<Long> essayIdList, @Param("userId") Long userId);

    List<CountVO> getEssayCollectCountByEssayIdList(@Param("essayIdList") List<Long> essayIdList, @Param("userId") Long userId);

    List<CountVO> getEssayCommentCountByEssayIdList(@Param("essayIdList") List<Long> essayIdList, @Param("userId") Long userId);

    GetOneEssayOutDTO getOneEssayById(Long essayId);

    List<ShaneEssay> myCollected(Long userId);

    List<EssayLabelOutDTO> getEssayLabelListByEssayIdList(List<Long> essayIdList);

    Integer countAndPageByContent(String content);
}




